// VS_BEGIN
#version 330 core

uniform vec3 u_begin;
uniform vec3 u_end;

layout (std140) uniform EngineUBO
{
    mat4 u_view;
    mat4 u_project;
    vec3 u_camPos;
};


void main() {
    vec3 pos;
    if (gl_VertexID == 0) {
        pos = u_begin;
    } else {
        pos = u_end;
    }
    gl_Position = u_project * u_view * vec4(pos, 1.0f);
}
// VS_END

// FS_BEGIN
#version 330 core

out vec4 FragColor;

uniform vec4 u_color;

void main() {
    FragColor = u_color;   
}
// FS_END